package Object;

//public static boolean equals(Object a, Object b) 比较两个对象是否相等
public class objectdemo2 {
    public static void main(String[] args) {

        Student s1 = new Student("张三",18);
        Student s2 = new Student("张三",18);
        System.out.println(s1.equals(s2));//比的是属性值

    }
}
